package com.xjtu.se.homework.ops.login.service.impl;

import com.xjtu.se.homework.ops.login.dto.AdminDto;
import com.xjtu.se.homework.ops.login.service.LoginService;
import com.xjtu.se.homework.ops.login.dao.LoginDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class LoginServiceImpl implements LoginService {

    @Resource
    private LoginDao loginDao;

    @Override
    public boolean checkadmin(AdminDto dto) {
        return loginDao.findAdminById(dto) > 0;
    }
}
